function reg(data) {  
    return new Promise(resolve => {
        ajax({
            type : 'post' ,
            path : '../php/reg.php' ,
            data ,
            successCB : res => {
                resolve(res)
            }
        })
    })
}


function login(data) {  
    return new Promise(resolve => {
        ajax({
            type : 'post' ,
            path : '../php/login.php' ,
            data ,
            successCB : res => {
                resolve(res)
            }
        })
    })
}

